<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=UTF-8" />
<title>Module: Sass::Version</title>
<link rel="stylesheet" href="style.css" tppabs="http://sass-lang.com/docs/yardoc/css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="common.css" tppabs="http://sass-lang.com/docs/yardoc/css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '..';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="jquery.js" tppabs="http://sass-lang.com/docs/yardoc/js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="app.js" tppabs="http://sass-lang.com/docs/yardoc/js/app.js"></script>

  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html" tppabs="http://sass-lang.com/docs/yardoc/_index.html">Index (V)</a> &raquo; 
    <span class='title'><a href="Sass-1.html" tppabs="http://sass-lang.com/docs/yardoc/Sass.html" title="Sass (module)">Sass</a></span>
     &raquo; 
    <span class="title">Version</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="javascript:if(confirm(%27http://sass-lang.com/docs/yardoc/Sass/.  \n\nThis file was not retrieved by Teleport Pro, because the server reports that this file cannot be found.  \n\nDo you want to open it from the server?%27))window.location=%27http://sass-lang.com/docs/yardoc/Sass/.%27" tppabs="http://sass-lang.com/docs/yardoc/Sass/." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Module: Sass::Version 
  
  
</h1>

<dl class="box">
  
  
    
  
    
      <dt class="r1">Includes:</dt>
      <dd class="r1"><a href="Util.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html" title="Sass::Util (module)">Util</a></dd>
      
    
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">/var/www/sass-pages/.sass/lib/sass/version.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>Handles Sass version-reporting. Sass not only reports the standard three version numbers, but its Git revision hash as well, if it was installed from Git.</p>

  </div>
</div>
<div class="tags">
  
</div>
  <h2>Constant Summary</h2>
  


  
  
  
  
  <h3 class="inherited">Constants included from <a href="Util.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html" title="Sass::Util (module)">Util</a></h3>
  <p class="inherited"><a href="Util.html#RUBY_ENGINE-constant" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#RUBY_ENGINE-constant" title="Sass::Util::RUBY_ENGINE (constant)">RUBY_ENGINE</a>, <a href="Util.html#RUBY_VERSION-constant" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#RUBY_VERSION-constant" title="Sass::Util::RUBY_VERSION (constant)">RUBY_VERSION</a></p>


  <h2>Instance Method Summary</h2>

  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#version-instance_method" title="#version (instance method)">- ({Symbol =&gt; String/Fixnum}) <strong>version</strong> </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc">Returns a hash representing the version of Sass.</span>
  
</li>

    
  </ul>

  
  
  
  
  
  <h3 class="inherited">Methods included from <a href="Util.html" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html" title="Sass::Util (module)">Util</a></h3>
  <p class="inherited"><a href="Util.html#abstract-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#abstract-instance_method" title="Sass::Util#abstract (method)">#abstract</a>, <a href="Util.html#ap_geq%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#ap_geq%3F-instance_method" title="Sass::Util#ap_geq? (method)">#ap_geq?</a>, <a href="Util.html#ap_geq_3%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#ap_geq_3%3F-instance_method" title="Sass::Util#ap_geq_3? (method)">#ap_geq_3?</a>, <a href="Util.html#array_minus-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#array_minus-instance_method" title="Sass::Util#array_minus (method)">#array_minus</a>, <a href="Util.html#av_template_class-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#av_template_class-instance_method" title="Sass::Util#av_template_class (method)">#av_template_class</a>, <a href="Util.html#caller_info-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#caller_info-instance_method" title="Sass::Util#caller_info (method)">#caller_info</a>, <a href="Util.html#check_encoding-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#check_encoding-instance_method" title="Sass::Util#check_encoding (method)">#check_encoding</a>, <a href="Util.html#check_range-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#check_range-instance_method" title="Sass::Util#check_range (method)">#check_range</a>, <a href="Util.html#check_sass_encoding-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#check_sass_encoding-instance_method" title="Sass::Util#check_sass_encoding (method)">#check_sass_encoding</a>, <a href="Util.html#destructure-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#destructure-instance_method" title="Sass::Util#destructure (method)">#destructure</a>, <a href="Util.html#enum_cons-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#enum_cons-instance_method" title="Sass::Util#enum_cons (method)">#enum_cons</a>, <a href="Util.html#enum_slice-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#enum_slice-instance_method" title="Sass::Util#enum_slice (method)">#enum_slice</a>, <a href="Util.html#enum_with_index-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#enum_with_index-instance_method" title="Sass::Util#enum_with_index (method)">#enum_with_index</a>, <a href="Util.html#extract%21-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#extract%21-instance_method" title="Sass::Util#extract! (method)">#extract!</a>, <a href="Util.html#extract_values-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#extract_values-instance_method" title="Sass::Util#extract_values (method)">#extract_values</a>, <a href="Util.html#flatten-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#flatten-instance_method" title="Sass::Util#flatten (method)">#flatten</a>, <a href="Util.html#glob-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#glob-instance_method" title="Sass::Util#glob (method)">#glob</a>, <a href="Util.html#group_by_to_a-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#group_by_to_a-instance_method" title="Sass::Util#group_by_to_a (method)">#group_by_to_a</a>, <a href="Util.html#has%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#has%3F-instance_method" title="Sass::Util#has? (method)">#has?</a>, <a href="Util.html#hash_to_a-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#hash_to_a-instance_method" title="Sass::Util#hash_to_a (method)">#hash_to_a</a>, <a href="Util.html#inject_values-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#inject_values-instance_method" title="Sass::Util#inject_values (method)">#inject_values</a>, <a href="Util.html#inspect_obj-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#inspect_obj-instance_method" title="Sass::Util#inspect_obj (method)">#inspect_obj</a>, <a href="Util.html#intersperse-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#intersperse-instance_method" title="Sass::Util#intersperse (method)">#intersperse</a>, <a href="Util.html#ironruby%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#ironruby%3F-instance_method" title="Sass::Util#ironruby? (method)">#ironruby?</a>, <a href="Util.html#jruby1_6%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#jruby1_6%3F-instance_method" title="Sass::Util#jruby1_6? (method)">#jruby1_6?</a>, <a href="Util.html#jruby%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#jruby%3F-instance_method" title="Sass::Util#jruby? (method)">#jruby?</a>, <a href="Util.html#jruby_version-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#jruby_version-instance_method" title="Sass::Util#jruby_version (method)">#jruby_version</a>, <a href="Util.html#lcs-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#lcs-instance_method" title="Sass::Util#lcs (method)">#lcs</a>, <a href="Util.html#macruby%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#macruby%3F-instance_method" title="Sass::Util#macruby? (method)">#macruby?</a>, <a href="Util.html#map_hash-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#map_hash-instance_method" title="Sass::Util#map_hash (method)">#map_hash</a>, <a href="Util.html#map_keys-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#map_keys-instance_method" title="Sass::Util#map_keys (method)">#map_keys</a>, <a href="Util.html#map_vals-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#map_vals-instance_method" title="Sass::Util#map_vals (method)">#map_vals</a>, <a href="Util.html#merge_adjacent_strings-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#merge_adjacent_strings-instance_method" title="Sass::Util#merge_adjacent_strings (method)">#merge_adjacent_strings</a>, <a href="Util.html#ord-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#ord-instance_method" title="Sass::Util#ord (method)">#ord</a>, <a href="Util.html#paths-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#paths-instance_method" title="Sass::Util#paths (method)">#paths</a>, <a href="Util.html#powerset-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#powerset-instance_method" title="Sass::Util#powerset (method)">#powerset</a>, <a href="Util.html#rails_env-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#rails_env-instance_method" title="Sass::Util#rails_env (method)">#rails_env</a>, <a href="Util.html#rails_root-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#rails_root-instance_method" title="Sass::Util#rails_root (method)">#rails_root</a>, <a href="Util.html#rbx%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#rbx%3F-instance_method" title="Sass::Util#rbx? (method)">#rbx?</a>, <a href="Util.html#restrict-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#restrict-instance_method" title="Sass::Util#restrict (method)">#restrict</a>, <a href="Util.html#ruby1%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#ruby1%3F-instance_method" title="Sass::Util#ruby1? (method)">#ruby1?</a>, <a href="Util.html#ruby1_8%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#ruby1_8%3F-instance_method" title="Sass::Util#ruby1_8? (method)">#ruby1_8?</a>, <a href="Util.html#ruby1_8_6%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#ruby1_8_6%3F-instance_method" title="Sass::Util#ruby1_8_6? (method)">#ruby1_8_6?</a>, <a href="Util.html#sass_warn-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#sass_warn-instance_method" title="Sass::Util#sass_warn (method)">#sass_warn</a>, <a href="Util.html#scope-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#scope-instance_method" title="Sass::Util#scope (method)">#scope</a>, <a href="Util.html#set_eql%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#set_eql%3F-instance_method" title="Sass::Util#set_eql? (method)">#set_eql?</a>, <a href="Util.html#set_hash-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#set_hash-instance_method" title="Sass::Util#set_hash (method)">#set_hash</a>, <a href="Util.html#silence_sass_warnings-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#silence_sass_warnings-instance_method" title="Sass::Util#silence_sass_warnings (method)">#silence_sass_warnings</a>, <a href="Util.html#silence_warnings-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#silence_warnings-instance_method" title="Sass::Util#silence_warnings (method)">#silence_warnings</a>, <a href="Util.html#strip_string_array-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#strip_string_array-instance_method" title="Sass::Util#strip_string_array (method)">#strip_string_array</a>, <a href="Util.html#subsequence%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#subsequence%3F-instance_method" title="Sass::Util#subsequence? (method)">#subsequence?</a>, <a href="Util.html#substitute-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#substitute-instance_method" title="Sass::Util#substitute (method)">#substitute</a>, <a href="Util.html#to_hash-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#to_hash-instance_method" title="Sass::Util#to_hash (method)">#to_hash</a>, <a href="Util.html#undefined_conversion_error_char-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#undefined_conversion_error_char-instance_method" title="Sass::Util#undefined_conversion_error_char (method)">#undefined_conversion_error_char</a>, <a href="Util.html#version_geq-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#version_geq-instance_method" title="Sass::Util#version_geq (method)">#version_geq</a>, <a href="Util.html#version_gt-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#version_gt-instance_method" title="Sass::Util#version_gt (method)">#version_gt</a>, <a href="Util.html#windows%3F-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#windows%3F-instance_method" title="Sass::Util#windows? (method)">#windows?</a>, <a href="Util.html#with_extracted_values-instance_method" tppabs="http://sass-lang.com/docs/yardoc/Sass/Util.html#with_extracted_values-instance_method" title="Sass::Util#with_extracted_values (method)">#with_extracted_values</a></p>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="version-instance_method">
  
    - (<tt>{Symbol =&gt; String/Fixnum}</tt>) <strong>version</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>Returns a hash representing the version of Sass. The <code>:major</code>, <code>:minor</code>, and <code>:teeny</code> keys have their respective numbers as Fixnums. The <code>:name</code> key has the name of the version. The <code>:string</code> key contains a human-readable string representation of the version. The <code>:number</code> key is the major, minor, and teeny keys separated by periods. The <code>:date</code> key, which is not guaranteed to be defined, is the <span>DateTime</span> at which this release was cut. If Sass is checked out from Git, the <code>:rev</code> key will have the revision hash. For example:</p>

<pre class="code">{
  :string =&gt; &quot;2.1.0.9616393&quot;,
  :rev    =&gt; &quot;9616393b8924ef36639c7e82aa88a51a24d16949&quot;,
  :number =&gt; &quot;2.1.0&quot;,
  :date   =&gt; DateTime.parse(&quot;Apr 30 13:52:01 2009 -0700&quot;),
  :major  =&gt; 2, :minor =&gt; 1, :teeny =&gt; 0
}</pre>

<p>If a prerelease version of Sass is being used, the <code>:string</code> and <code>:number</code> fields will reflect the full version (e.g. <code>&quot;2.2.beta.1&quot;</code>), and the <code>:teeny</code> field will be <code>-1</code>. A <code>:prerelease</code> key will contain the name of the prerelease (e.g. <code>&quot;beta&quot;</code>), and a <code>:prerelease_number</code> key will contain the rerelease number. For example:</p>

<pre class="code">{
  :string =&gt; &quot;3.0.beta.1&quot;,
  :number =&gt; &quot;3.0.beta.1&quot;,
  :date   =&gt; DateTime.parse(&quot;Mar 31 00:38:04 2010 -0700&quot;),
  :major =&gt; 3, :minor =&gt; 0, :teeny =&gt; -1,
  :prerelease =&gt; &quot;beta&quot;,
  :prerelease_number =&gt; 1
}</pre>

  </div>
</div>
<div class="tags">
  <h3>Returns:</h3>
<ul class="return">
  
    <li>
      
        <span class='type'>(<tt>{Symbol =&gt; String/Fixnum}</tt>)</span>
      
      
      
      
        &mdash;
        The version hash
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File '/var/www/sass-pages/.sass/lib/sass/version.rb', line 50</span>

def version
  return @@version if defined?(@@version)

  numbers = File.read(scope('VERSION')).strip.split('.').
    map {|n| n =~ /^[0-9]+$/ ? n.to_i : n}
  name = File.read(scope('VERSION_NAME')).strip
  @@version = {
    :major => numbers[0],
    :minor => numbers[1],
    :teeny => numbers[2],
    :name => name
  }

  if date = version_date
    @@version[:date] = date
  end

  if numbers[3].is_a?(String)
    @@version[:teeny] = -1
    @@version[:prerelease] = numbers[3]
    @@version[:prerelease_number] = numbers[4]
  end

  @@version[:number] = numbers.join('.')
  @@version[:string] = @@version[:number].dup

  if rev = revision_number
    @@version[:rev] = rev
    unless rev[0] == ?(
      @@version[:string] << "." << rev[0...7]
    end
  end

  @@version[:string] << " (#{name})"
  @@version
end</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Fri Mar  8 20:33:54 2013 by 
  <a href="javascript:if(confirm(%27http://yardoc.org/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?%27))window.location=%27http://yardoc.org/%27" tppabs="http://yardoc.org/" title="Yay! A Ruby Documentation Tool">yard</a>
  0.5.3 (ruby-1.8.7).
</div>


  <script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  </script>
  <script type="text/javascript">
  try {
  var pageTracker = _gat._getTracker("UA-535380-8");
  pageTracker._trackPageview();
  } catch(err) {}</script>


  </body>
</html>